const fs = require('fs')

const buffer = fs.readFileSync('./sample_wave.dat')

const store = []

for (let i = 0; i < buffer.length; i = i + 2) {
  store.push(buffer.readInt16LE(i))
}

fs.writeFileSync('./data.js', 'export default ' + JSON.stringify(store))